import { createApp } from 'vue'
import '@/styles/index.scss'
// 导入Unocss
import 'uno.css'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import { setupRouter } from '@/router'
import { setupStore } from '@/store'
import App from './App.vue'
import { basicSetup } from 'codemirror'
import VueCodemirror from 'vue-codemirror'

function setupApp() {
  const app = createApp(App)
  app.use(VueCodemirror, {
    // optional default global options
    autofocus: true,
    disabled: false,
    indentWithTab: true,
    tabSize: 2,
    placeholder: 'Code goes here...',
    extensions: [basicSetup],
    // ...
  })
  app.use(Antd)
  setupRouter(app)
  setupStore(app)
  app.mount('#app')
}

setupApp()
